Skip to content

Feat(Client): remind aticle list 수정#284

Merged
jjangminii merged 8 commits intodevelopfrom
feat/#282/remind-aticle-list
Feb 26, 2026
Merged

Feat(Client): remind aticle list 수정#284
jjangminii merged 8 commits intodevelopfrom
feat/#282/remind-aticle-list

Conversation

@jjangminii
Copy link
Collaborator

@jjangminii jjangminii commented Feb 26, 2026

📌 Related Issues

관련된 Issue를 태그해주세요. (e.g. - close #25)

📄 Tasks

  • 리마인드 메타데이터 호출방식 변경에대해 업데이트했습니다.
  • 아티클 상세보기 업데이트

⭐ PR Point (To Reviewer)

  • 로딩처리는 아직 안했어요
  • 로딩처리와 같이 로직분리하고자합니다
  • 이 이슈에서 같이 작업할까했는데 api 변경 사항에 대해 제가 헷갈려할거 같아서 새로 파서 작업하고자합니다..

📷 Screenshot

image

Summary by CodeRabbit

  • 새로운 기능

    • 알림 기사에 24시간 유효기간 적용 — 발생 후 24시간 이내만 표시됩니다.
    • 사이드바에서 아콘(획득 코인) 증가 시 토스트 알림 표시 추가.
  • 개선 사항

    • 카드 기반 UI로 알림 목록 통일 — 제목/이미지/내용/남은시간/카테고리 표시 개선 및 기본값 처리 강화.
    • 편집 모달과 읽음 상태 처리 흐름 안정화.
  • 버그 픽스

    • 알림·북마크 목록 동기화 및 API 호출 안정성 개선으로 목록 정확도 향상.

@jjangminii jjangminii linked an issue Feb 26, 2026 that may be closed by this pull request
@vercel
Copy link

vercel bot commented Feb 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pinback-client-client Ready Ready Preview, Comment Feb 26, 2026 9:45am
pinback-client-landing Ready Ready Preview, Comment Feb 26, 2026 9:45am

@github-actions github-actions bot added the feat 기능 개발하라 개발 달려라 달려 label Feb 26, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

Walkthrough

리마인드 페이지가 내부 FetchCard를 제거하고 디자인 시스템의 Card로 전환되었고, 리마인드 노출을 remindAt 기준으로 발생 후 24시간 이내로 필터링하는 로직이 추가되었습니다. API 엔드포인트(v3), 타입(articleId/thumbnailUrl/categoryColor 등), 쿼리 키(arconsacorns) 및 CardEditModal 관련 키/페이로드도 정렬되었습니다.

Changes

Cohort / File(s) Summary
Remind 페이지 UI
apps/client/src/pages/remind/Remind.tsx
FetchCard 제거 후 디자인 시스템 Card로 렌더링 전환. 카드 클릭 시 읽음 뮤테이션 호출하고 관련 쿼리들(invalidateQueries) 무효화. remindAt이 과거이고 +24시간 이내인 항목만 표시하도록 만료 필터 추가. 빈 상태·툴팁·푸터 로직 유지.
삭제된 컴포넌트
apps/client/src/pages/remind/components/fetchCard/FetchCard.tsx
메타 페칭·로딩 스켈레톤을 포함하던 FetchCard 컴포넌트가 삭제됨.
Remind API 클라이언트
apps/client/src/pages/remind/apis/axios.ts
리마인드 목록 GET 엔드포인트를 /api/v2/articles/remind/api/v3/articles/remind로 변경(파라미터/반환 형태 유지).
타입 변경(리마인드 전반)
apps/client/src/pages/remind/types/api.ts
Category.categoryColor 추가. ArticleWithCategorytitle, thumbnailUrl, isReadAfterRemind 추가. ArticleListResponsehasNext, totalArticleCount 추가.
공유 API/타입/모달 정렬
apps/client/src/shared/apis/axios.ts, apps/client/src/shared/types/api.ts, apps/client/src/shared/components/cardEditModal/CardEditModal.tsx
getArticleDetail v1→v3 경로 변경. ArticleDetailResponseidarticleId, 일부 필드 nullable 처리 및 title/thumbnailUrl 추가. CardEditModal은 page meta 의존 제거하고 prevData 필드(예: title/thumbnailUrl) 사용, 페이로드에서 articleId 사용으로 정렬.
쿼리 훅·쿼리키 변경 및 카테고리 훅 추가
apps/client/src/shared/apis/queries.ts
useGetArconsuseGetAcorns로 이름·쿼리키 변경(['arcons']['acorns']). 카테고리 관련 훅(usePostCategory, usePutCategory, useDeleteCategory) 추가. usePutArticleReadStatus의 onSuccess에서 여러 쿼리 무효화 추가.
사이드바·레벨·마이북마크 연동
apps/client/src/shared/components/sidebar/Sidebar.tsx, apps/client/src/pages/level/Level.tsx, apps/client/src/pages/myBookmark/...
acorn 훅/쿼리키 변경 반영, 사이드바에 acorn 토스트/증가 효과 추가. MyBookmark 및 CardEditModal 키 사용을 articleId로 정렬하고 쿼리 무효화 키를 acorns로 수정.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant User
    participant Browser
    participant RemindPage as Remind::CardList
    participant QueryClient as ReactQuery
    participant API as API:/api/v3

    User->>Browser: 카드 클릭
    Browser->>RemindPage: onCardClick(articleId, url)
    RemindPage->>QueryClient: mutate putArticleReadStatus(articleId)
    QueryClient->>API: PUT /api/.../read-status (articleId)
    API-->>QueryClient: 200 OK
    QueryClient->>QueryClient: invalidateQueries(['remindArticles'])
    QueryClient->>QueryClient: invalidateQueries(['acorns'])
    RemindPage->>Browser: window.open(url)
    Browser->>User: 새 탭에 아티클 열림
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

🛠️ Feature, frontend, api

Suggested reviewers

  • jllee000
  • constantly-dev

Poem

🐇 카드가 바뀌고 창은 스물네 시간,
토글 하나로 읽음표시 탁! 하고 번쩍.
v3 길 따라 데이터 뛰어가고,
캐시 정리 끝나면 당근 한입 쪽! 🥕✨

🚥 Pre-merge checks | ✅ 1 | ❌ 4

❌ Failed checks (1 warning, 3 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive 제목이 리마인드 아티클 목록 수정을 간략히 언급하지만 'aticle' 오타가 있고 'article list'에 대한 구체적인 변경사항을 명확하게 전달하지 못합니다. 제목의 오타를 수정('aticle' → 'article')하고 구체적인 변경 내용(예: 메타데이터 호출 방식, API 버전 업데이트 등)을 반영하도록 개선해주세요.
Description check ❓ Inconclusive PR 설명이 기본 구조는 따르나, Tasks 섹션이 불완전하고 구체적인 변경사항 설명이 부족합니다. Tasks 섹션을 더 상세히 작성하여 각 파일의 변경사항(API 버전 업데이트, 타입 정의 추가, 컴포넌트 리팩토링 등)을 명확히 설명해주세요.
Out of Scope Changes check ❓ Inconclusive Level.tsx의 useGetArcons → useGetAcorns 변경, MyBookmark.tsx의 동일 변경, Sidebar.tsx의 유사 변경 등이 #282 목표와 직접적 관련성이 명확하지 않아 범위 검증이 필요합니다. arcons/acorns 변경이 리마인드 아티클 API 업데이트와 어떤 관계가 있는지 명확히 하고, 필요시 범위 외 변경사항을 별도 PR로 분리하는 것을 고려해주세요.
✅ Passed checks (1 passed)
Check name Status Explanation
Linked Issues check ✅ Passed PR은 #282의 주요 요구사항인 리마인드 아티클 목록 조회 API 업데이트를 반영했으나, 연결된 #25(Progress 컴포넌트)는 이 PR의 범위와 무관합니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/#282/remind-aticle-list

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Feb 26, 2026

✅ Storybook chromatic 배포 확인:
🐿️ storybook

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/client/src/pages/remind/Remind.tsx (1)

89-90: ⚠️ Potential issue | 🟠 Major

REMIND_MOCK_DATA를 사용하여 제목을 조회하는 로직이 실제 데이터와 연결되지 않습니다.

getItemTitle 함수가 REMIND_MOCK_DATA에서 제목을 찾고 있지만, 실제 API에서 받아온 articlesToDisplay의 article ID와 mock 데이터의 ID가 일치하지 않을 가능성이 높습니다. 이로 인해 OptionsMenuPortalgetCategoryName prop이 항상 빈 문자열을 반환할 수 있습니다.

🐛 실제 아티클 데이터를 사용하도록 수정
-  const getItemTitle = (id: number | null) =>
-    id == null ? '' : (REMIND_MOCK_DATA.find((d) => d.id === id)?.title ?? '');
+  const getItemTitle = (id: number | null) =>
+    id == null
+      ? ''
+      : (articlesToDisplay.find((a) => a.articleId === id)?.title || '제목 없음');

또한 REMIND_MOCK_DATA import가 더 이상 필요하지 않다면 제거하세요:

-import { REMIND_MOCK_DATA } from './constants';
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/client/src/pages/remind/Remind.tsx` around lines 89 - 90, getItemTitle
currently looks up titles from REMIND_MOCK_DATA which can mismatch real
articles; change getItemTitle to search the actual articlesToDisplay array
(e.g., find an item where item.id === id and return its title or '') so
OptionsMenuPortal's getCategoryName receives real data; after switching, remove
the REMIND_MOCK_DATA import if it's no longer used.
🧹 Nitpick comments (2)
apps/client/src/pages/remind/Remind.tsx (1)

16-16: REMIND_MOCK_DATA import는 실제 데이터 사용 시 제거 대상입니다.

앞서 언급한 getItemTitle 수정 후 이 import가 불필요해집니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/client/src/pages/remind/Remind.tsx` at line 16, The import
REMIND_MOCK_DATA in Remind.tsx is now unused after the getItemTitle change;
remove the import statement for REMIND_MOCK_DATA from the top of Remind.tsx to
avoid an unnecessary dependency and unused symbol.
apps/client/src/pages/remind/apis/axios.ts (1)

3-19: LGTM - API 버전 업그레이드 완료

v2에서 v3로의 엔드포인트 변경이 적절합니다.

선택적 개선: 반환 타입을 명시하면 타입 안전성이 향상됩니다.

♻️ 타입 안전성을 위한 제안
+import { ArticleListResponse } from '../types/api';
+
 export const getRemindArticles = async (
   nowDate: string,
   readStatus: boolean,
   page: number,
   size: number
-) => {
+): Promise<ArticleListResponse> => {
   const { data } = await apiRequest.get(`/api/v3/articles/remind`, {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/client/src/pages/remind/apis/axios.ts` around lines 3 - 19, The
getRemindArticles function lacks an explicit return type which reduces type
safety; update its signature to declare and return a proper typed promise (e.g.,
Promise<YourResponseType[]> or a paged response type) matching the shape
returned by apiRequest.get, define or import the corresponding interface/type
(e.g., RemindArticle, RemindArticlesResponse) and use it in the function
signature and when extracting data so callers get full type information; refer
to getRemindArticles and the response payload accessed via data.data to model
the return type.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@apps/client/src/pages/remind/Remind.tsx`:
- Around line 89-90: getItemTitle currently looks up titles from
REMIND_MOCK_DATA which can mismatch real articles; change getItemTitle to search
the actual articlesToDisplay array (e.g., find an item where item.id === id and
return its title or '') so OptionsMenuPortal's getCategoryName receives real
data; after switching, remove the REMIND_MOCK_DATA import if it's no longer
used.

---

Nitpick comments:
In `@apps/client/src/pages/remind/apis/axios.ts`:
- Around line 3-19: The getRemindArticles function lacks an explicit return type
which reduces type safety; update its signature to declare and return a proper
typed promise (e.g., Promise<YourResponseType[]> or a paged response type)
matching the shape returned by apiRequest.get, define or import the
corresponding interface/type (e.g., RemindArticle, RemindArticlesResponse) and
use it in the function signature and when extracting data so callers get full
type information; refer to getRemindArticles and the response payload accessed
via data.data to model the return type.

In `@apps/client/src/pages/remind/Remind.tsx`:
- Line 16: The import REMIND_MOCK_DATA in Remind.tsx is now unused after the
getItemTitle change; remove the import statement for REMIND_MOCK_DATA from the
top of Remind.tsx to avoid an unnecessary dependency and unused symbol.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5a38bab and b7f6278.

📒 Files selected for processing (4)
  • apps/client/src/pages/remind/Remind.tsx
  • apps/client/src/pages/remind/apis/axios.ts
  • apps/client/src/pages/remind/components/fetchCard/FetchCard.tsx
  • apps/client/src/pages/remind/types/api.ts
💤 Files with no reviewable changes (1)
  • apps/client/src/pages/remind/components/fetchCard/FetchCard.tsx

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
apps/client/src/shared/apis/axios.ts (1)

51-54: 개발 주석 제거 필요

// 이거 업데이트 주석은 개발 중 메모로 보이며, 머지 전에 제거하는 것이 좋습니다.

🧹 주석 제거 제안
-// 이거 업데이트
 export const getArticleDetail = async (articleId: number) => {
   const { data } = await apiRequest.get(`/api/v3/articles/${articleId}`);
   return data.data;
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/client/src/shared/apis/axios.ts` around lines 51 - 54, Remove the
leftover development comment "// 이거 업데이트" above the getArticleDetail function;
keep the function signature and implementation (export const getArticleDetail =
async (articleId: number) => { ... }) unchanged and ensure no other stray dev
comments remain in this file.
apps/client/src/pages/remind/Remind.tsx (1)

183-191: 읽음 상태 업데이트 에러 핸들링 개선 고려

현재 onError에서 console.error만 호출하고 있습니다. 사용자에게 피드백을 주기 위한 토스트 메시지 추가를 고려해 보세요.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/client/src/pages/remind/Remind.tsx` around lines 183 - 191, The onError
handler for the mutation that updates read status only logs to console; add
user-visible feedback by invoking your app's toast/notification utility (e.g.,
useToast or showToast) inside the onError callback of the mutation that
surrounds the queryClient.invalidateQueries calls, passing a short message like
"읽음 상태 업데이트에 실패했습니다" and include the error message for debugging; ensure the
toast hook/import is present in Remind.tsx and keep the existing
queryClient.invalidateQueries usage in onSuccess unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/client/src/pages/remind/Remind.tsx`:
- Around line 95-101: The query key string 'arcons' is a typo and must be
corrected to 'acorns' to match the existing query definitions and types
(useGetArcons, AcornsResponse, getAcorns()); update every occurrence where the
key is used (e.g., the two queryClient.invalidateQueries calls in Remind.tsx and
the other listed places) so the queryKey arrays use ['acorns'] instead of
['arcons'], ensuring consistency with the useGetArcons/query definition and any
related cache invalidation logic.

---

Nitpick comments:
In `@apps/client/src/pages/remind/Remind.tsx`:
- Around line 183-191: The onError handler for the mutation that updates read
status only logs to console; add user-visible feedback by invoking your app's
toast/notification utility (e.g., useToast or showToast) inside the onError
callback of the mutation that surrounds the queryClient.invalidateQueries calls,
passing a short message like "읽음 상태 업데이트에 실패했습니다" and include the error message
for debugging; ensure the toast hook/import is present in Remind.tsx and keep
the existing queryClient.invalidateQueries usage in onSuccess unchanged.

In `@apps/client/src/shared/apis/axios.ts`:
- Around line 51-54: Remove the leftover development comment "// 이거 업데이트" above
the getArticleDetail function; keep the function signature and implementation
(export const getArticleDetail = async (articleId: number) => { ... }) unchanged
and ensure no other stray dev comments remain in this file.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b7f6278 and c70c6f5.

📒 Files selected for processing (5)
  • apps/client/src/pages/myBookmark/MyBookmark.tsx
  • apps/client/src/pages/remind/Remind.tsx
  • apps/client/src/shared/apis/axios.ts
  • apps/client/src/shared/components/cardEditModal/CardEditModal.tsx
  • apps/client/src/shared/types/api.ts

Comment on lines 95 to 101
queryClient.invalidateQueries({
queryKey: ['remindArticles'],
});

queryClient.invalidateQueries({
queryKey: ['arcons'],
});
Copy link

@coderabbitai coderabbitai bot Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for all usages of 'arcons' and 'acorns' query keys

echo "=== All 'arcons' usages ==="
rg -n "arcons" --type ts --type tsx

echo ""
echo "=== All 'acorns' usages ==="
rg -n "acorns" --type ts --type tsx

echo ""
echo "=== Checking MyBookmark.tsx specifically ==="
rg -n "queryKey" apps/client/src/pages/MyBookmark.tsx 2>/dev/null || rg -n "queryKey" --type tsx | grep -i bookmark

Repository: Pinback-Team/pinback-client

Length of output: 274


🏁 Script executed:

#!/bin/bash
# Search without file type restrictions

echo "=== All 'arcons' usages ==="
rg "arcons" --line-number

echo ""
echo "=== All 'acorns' usages ==="
rg "acorns" --line-number

echo ""
echo "=== Check if files exist ==="
find apps/client/src/pages -name "Remind.tsx" -o -name "MyBookmark.tsx"

echo ""
echo "=== Content of Remind.tsx around lines 95-101 ==="
sed -n '90,105p' apps/client/src/pages/remind/Remind.tsx 2>/dev/null || echo "File not found at that path"

echo ""
echo "=== Check for queryKey 'arcons' or 'acorns' in MyBookmark ==="
find . -name "MyBookmark*" -type f | head -5

Repository: Pinback-Team/pinback-client

Length of output: 2574


🏁 Script executed:

#!/bin/bash
# Check the query definition for 'arcons'

echo "=== Content of queries.ts around line 67 ==="
sed -n '60,75p' apps/client/src/shared/apis/queries.ts

echo ""
echo "=== Full context of 'arcons' usage in queries.ts ==="
rg -B5 -A5 "'arcons'" apps/client/src/shared/apis/queries.ts

Repository: Pinback-Team/pinback-client

Length of output: 787


쿼리 키 'arcons' 오타 수정 필요

'arcons''acorns'의 오타입니다. 쿼리 정의(useGetArcons), 반환 타입(AcornsResponse), 실제 함수 호출(getAcorns())은 모두 'acorns'를 사용하고 있어, 쿼리 키도 일관되게 'acorns'로 통일해야 합니다. 현재 다음 5개 위치에서 잘못된 쿼리 키를 사용하고 있습니다:

  • apps/client/src/shared/apis/queries.ts (쿼리 정의)
  • apps/client/src/pages/remind/Remind.tsx (2개 위치)
  • apps/client/src/pages/myBookmark/MyBookmark.tsx
  • apps/client/src/pages/myBookmark/components/myBookmarkContent/MyBookmarkContent.tsx
✏️ 쿼리 키 수정 제안
         queryClient.invalidateQueries({
-          queryKey: ['arcons'],
+          queryKey: ['acorns'],
         });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
queryClient.invalidateQueries({
queryKey: ['remindArticles'],
});
queryClient.invalidateQueries({
queryKey: ['arcons'],
});
queryClient.invalidateQueries({
queryKey: ['acorns'],
});
queryClient.invalidateQueries({
queryKey: ['acorns'],
});
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/client/src/pages/remind/Remind.tsx` around lines 95 - 101, The query key
string 'arcons' is a typo and must be corrected to 'acorns' to match the
existing query definitions and types (useGetArcons, AcornsResponse,
getAcorns()); update every occurrence where the key is used (e.g., the two
queryClient.invalidateQueries calls in Remind.tsx and the other listed places)
so the queryKey arrays use ['acorns'] instead of ['arcons'], ensuring
consistency with the useGetArcons/query definition and any related cache
invalidation logic.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이건 몰랐네요 ㅎㅎㅎㅎㅎ,,,

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@constantly-dev 넵! 작은 오타지만 쿼리 캐싱에 영향을 줄 수 있어서 5개 위치 모두 수정해주시면 좋을 것 같아요 😊

수정이 필요한 위치들:

  • apps/client/src/shared/apis/queries.ts (쿼리 정의)
  • apps/client/src/pages/remind/Remind.tsx (2곳)
  • apps/client/src/pages/myBookmark/MyBookmark.tsx
  • apps/client/src/pages/myBookmark/components/myBookmarkContent/MyBookmarkContent.tsx

🧠 Learnings used
Learnt from: constantly-dev
Repo: Pinback-Team/pinback-client PR: 2
File: pnpm-workspace.yaml:3-3
Timestamp: 2025-08-18T13:48:59.065Z
Learning: constantly-dev는 docs 디렉터리를 컨벤션 문서 추가용으로 사용할 예정이라고 명시했습니다.

Learnt from: constantly-dev
Repo: Pinback-Team/pinback-client PR: 5
File: apps/extension/src/index.css:1-1
Timestamp: 2025-08-19T17:18:57.678Z
Learning: constantly-dev는 디자인 시스템 설정 PR 머지 후 `import 'pinback/tailwind-config/shared-styles.css';`를 `app.css`나 `index.css`에서 사용하여 공유 스타일을 관리할 계획입니다.

Copy link
Member

@constantly-dev constantly-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨어요! 간단한 코멘트만 확인해주세요 👍

Comment on lines 95 to 101
queryClient.invalidateQueries({
queryKey: ['remindArticles'],
});

queryClient.invalidateQueries({
queryKey: ['arcons'],
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이건 몰랐네요 ㅎㅎㅎㅎㅎ,,,

Comment on lines 103 to 109
setIsDeleteOpen(false);

setDeleteTargetId(null);

closeMenu();
close();
},

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

공백 추가된건 prettier인가요?

? article.title
: '제목 없음';

const displayImageUrl = article.thumbnailUrl || undefined;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이미지 없을때 fallback image 처리해야겠네요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

card 컴포넌트에서 이미지 없을시 로고를 띄우고 있는걸로 아는데 따로 또 fallback 처리를 해야할까요?

Comment on lines 182 to 195
updateToReadStatus(article.articleId, {
onSuccess: () => {
queryClient.invalidateQueries({
queryKey: ['remindArticles'],
});

queryClient.invalidateQueries({
queryKey: ['arcons'],
});
},

onError: (error) => {
console.error(error);
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onSuccessonError가 해당 컴포넌트 로직에서 섞이는 것이 가독성 측면에서 별로라면 updateToReadStatus 정의한 곳에서 추가해도 될 것 같아요! 판단에 맞게!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확실히 onSuccess, onError를 옮기는게 가독성 측면에서 좋을것 같네요 👍

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/client/src/pages/remind/Remind.tsx (1)

82-83: ⚠️ Potential issue | 🟠 Major

REMIND_MOCK_DATA 사용은 프로덕션 코드에 적합하지 않습니다.

getItemTitle 함수가 목 데이터(REMIND_MOCK_DATA)에서 제목을 조회하고 있습니다. 실제 articlesToDisplay 데이터에서 제목을 가져와야 합니다. 현재 로직은 삭제 확인 팝업에 잘못된 제목이 표시되거나 빈 문자열이 반환될 수 있습니다.

🐛 실제 데이터에서 제목 조회하도록 수정
  const getItemTitle = (id: number | null) =>
-   id == null ? '' : (REMIND_MOCK_DATA.find((d) => d.id === id)?.title ?? '');
+   id == null ? '' : (articlesToDisplay.find((d) => d.articleId === id)?.title ?? '');
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/client/src/pages/remind/Remind.tsx` around lines 82 - 83, The
getItemTitle helper currently reads from REMIND_MOCK_DATA
(production-inappropriate) so replace that lookup to use the real articles list
(articlesToDisplay) instead: update getItemTitle (the function that takes id:
number | null) to return '' for null/undefined ids and otherwise find the
matching article via articlesToDisplay.find(a => a.id === id)?.title ?? '' so
the delete-confirm popup shows the actual title from the live data; ensure
articlesToDisplay is in scope (prop/state) or passed into getItemTitle if
needed.
🧹 Nitpick comments (1)
apps/client/src/pages/remind/Remind.tsx (1)

72-80: 24시간 필터링 로직 최적화 제안

new Date().getTime()filter 콜백 내부에서 호출되어 매 아티클마다 새 Date 객체가 생성됩니다. 성능상 큰 영향은 없지만, now를 필터 외부에서 한 번만 계산하면 더 명확합니다.

♻️ Date 객체 생성 최적화
+ const now = Date.now();
  const articlesToDisplay =
    data?.pages
      .flatMap((page) => page.articles)
      .filter((article) => {
-       const now = new Date().getTime();
        const remindTime = new Date(article.remindAt).getTime();
        const expirationTime = remindTime + 24 * 60 * 60 * 1000;
        return now >= remindTime && now < expirationTime;
      }) ?? [];
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/client/src/pages/remind/Remind.tsx` around lines 72 - 80, Compute "now"
once before filtering instead of inside the filter callback: move the const now
= new Date().getTime() out of the filter and reuse it when evaluating each
article.remindAt in the articlesToDisplay calculation (the chain starting at
data?.pages.flatMap and the filter that references article.remindAt and
remindTime/expirationTime). This avoids creating a new Date per article and
keeps the logic identical while improving clarity and minor performance.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@apps/client/src/pages/remind/Remind.tsx`:
- Around line 82-83: The getItemTitle helper currently reads from
REMIND_MOCK_DATA (production-inappropriate) so replace that lookup to use the
real articles list (articlesToDisplay) instead: update getItemTitle (the
function that takes id: number | null) to return '' for null/undefined ids and
otherwise find the matching article via articlesToDisplay.find(a => a.id ===
id)?.title ?? '' so the delete-confirm popup shows the actual title from the
live data; ensure articlesToDisplay is in scope (prop/state) or passed into
getItemTitle if needed.

---

Nitpick comments:
In `@apps/client/src/pages/remind/Remind.tsx`:
- Around line 72-80: Compute "now" once before filtering instead of inside the
filter callback: move the const now = new Date().getTime() out of the filter and
reuse it when evaluating each article.remindAt in the articlesToDisplay
calculation (the chain starting at data?.pages.flatMap and the filter that
references article.remindAt and remindTime/expirationTime). This avoids creating
a new Date per article and keeps the logic identical while improving clarity and
minor performance.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cd81fe4 and 84ba803.

📒 Files selected for processing (2)
  • apps/client/src/pages/remind/Remind.tsx
  • apps/client/src/shared/apis/queries.ts

@constantly-dev constantly-dev self-requested a review February 26, 2026 15:39
@jjangminii jjangminii merged commit 9ba5c25 into develop Feb 26, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat 기능 개발하라 개발 달려라 달려

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] 리마인드 아티클 목록 조회

2 participants